Main
2022-12-13

Shorter Hacks 22: systemd-analyse calendar

Compared to cron, systemd timers have their own, alternative time specification format. This is more human readable than the old cron specification – but a "new" format means new possibilities to screw up. Luckily systemd has a feature to check if a time specification is sound and really means what you intend:

$ systemd-analyze calendar "Mon,Tue *-01..04 12:00:00"
  Original form: Mon,Tue *-01..04 12:00:00
Normalized form: Mon,Tue *-*-01..04 12:00:00
    Next elapse: Mon 2023-01-02 12:00:00 CET
       (in UTC): Mon 2023-01-02 11:00:00 UTC
       From now: 2 weeks 6 days left



en shorterhacks systemd

The series Shorter Hacks consists of tips and tricks for Linux nerds. Flags, hacks, and features of everyday tools that you might not know already, but that will enrich your life. I currently have a list of around 40 hacks I collected and plan to publish them roughly weekly. In order for this series to continue, please send me your best trick(s). The focus is not on fancy new tools or extensive rc-file content, but little known features in software most people already use. Send them to michael bei schoenitzer punkt de.
This blog has an Atom-Feed and I plan to also post the Shorter Hacks articles on Mastodon and Twitter.

Creative Commons License "Shorter Hacks 22 systemd-analyze calendar" by Michael F. Schönitzer is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.